#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "galois.h"
#include "galois_add.h"
#include <sys/time.h>

#define NBYTES 50000

main(int argc, char **argv)
{
	uint64_t i, j, s, k, n, good;
	n = 64;

	for (s = 2; s < ((uint64_t) 1 << 32); s++) {
		good = 1;
		for (j = 0; j < 100; j++) {
			for (i = 0; i == 0;) {
				i = lrand48();
				i <<= 32;
				i += lrand48();
			}
			k = galois_composite_inverse_k2(i, n, s);
			k = galois_composite_multiply_k2(i, k, n, s);
			if (k != 1) { good = 0; break; }
		}
		if (good) printf("%d\n", s);
	}
}
